//
//  MSCollectionViewCell.m
//  EPA
//
//  Created by lanou3g on 16/4/19.
//  Copyright © 2016年 myFree. All rights reserved.
//

#import "MSCollectionViewCell.h"

@interface MSCollectionViewCell()
@property (weak, nonatomic) IBOutlet UIImageView *imageView;
@property (weak, nonatomic) IBOutlet UILabel *titleLable;

@end

@implementation MSCollectionViewCell

- (void)awakeFromNib {
    // Initialization code
}
- (void)setModel:(MSHomeModel *)model {
    if (_model != model) {
        _model = model;
        
    }
}
-(void)layoutSubviews {
    self.titleLable.text = self.model.name;

    dispatch_async(dispatch_get_main_queue(), ^{
        self.imageView.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:self.model.coverimg]]];
    });
   
}
@end
